package innerclass;

public class MethodLocalInnerClass2 {

	private String name;
	private MethodLocalInnerClass2 class2;

	public void doSth() {

		class MyMethodLocalInnerClass2 extends MethodLocalInnerClass2 {
			private int a = 1;
			int b = 1;
			protected final int c = 1;
			
			public MyMethodLocalInnerClass2() {
				setName("MyMethodLocalInnerClass2");
			}
		}
		
		this.class2 = new MyMethodLocalInnerClass2();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public MethodLocalInnerClass2 getClass2() {
		return class2;
	}

	public void setClass2(MethodLocalInnerClass2 class2) {
		this.class2 = class2;
	}

	@Override
	public String toString() {
		return this.class2.name;
	}
	
	public static void main(String[] args) {
		MethodLocalInnerClass2 c = new MethodLocalInnerClass2();
		c.doSth();
		System.out.println(c);
	}
}
